package high.concurrent.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import high.concurrent.model.CouponDO;
import org.springframework.data.repository.query.Param;

/**
 * <p>
 *  Mapper 接口
 *  Mapper 接口
 * </p>
 *
 * @author 黄保泽
 * @since 2021-07-17
 */
public interface CouponMapper extends BaseMapper<CouponDO> {

    /**
     * 扣减优惠券数量 -1
     * @param couponId      优惠券id
     * @return
     */
    int reduceStock(@Param("couponId") Long couponId);
}
